package santeclair.referentiel.gestionnaire.bean;

// Generated 9 mars 2011 17:15:44 by Hibernate Tools 3.3.0.GA

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * UtilisateurParCelluleTraitement generated by hbm2java
 */
@Entity
@Table(name = "tl_utilisateur_par_cellule_traitement", catalog = "referentiel_gestionnaire")
public class UtilisateurParCelluleTraitement implements java.io.Serializable {

	private static final long serialVersionUID = -4641259627836875787L;
	
	private UtilisateurParCelluleTraitementId id;
    private CelluleTraitement celluleTraitement;

    @EmbeddedId
    @AttributeOverrides( {
            @AttributeOverride(name = "idutilisateur", column = @Column(name = "IDUTILISATEUR", nullable = false, length = 32)),
            @AttributeOverride(name = "identifiantCelluleTraitement", column = @Column(name = "IDENTIFIANT_CELLULE_TRAITEMENT", nullable = false)) })
    public UtilisateurParCelluleTraitementId getId() {
        return this.id;
    }

    public void setId(UtilisateurParCelluleTraitementId id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "IDENTIFIANT_CELLULE_TRAITEMENT", nullable = false, insertable = false, updatable = false)
    public CelluleTraitement getCelluleTraitement() {
        return this.celluleTraitement;
    }

    public void setCelluleTraitement(CelluleTraitement celluleTraitement) {
        this.celluleTraitement = celluleTraitement;
    }

}
